<%@ page language="java" pageEncoding="UTF-8" isELIgnored="false"%>
<link href="<%=path%>/res/css/header.css" rel="stylesheet" type="text/css" />
<style>
	.blue {
		background-color: rgba(68, 68, 68, 0.89) !important;
	}
</style>
<script>
	$(function () {

			if (${user.message} != 0)
			{
				$('#messages').html(${user.message});
			}
			else{
				$('#messages').hide();
			}
			$('.dropdown-button').dropdown({
					hover: true,
					gutter: 0,
					belowOrigin: true,
					alignment: 'left'
				}
			);

	});
</script>

<style>
	i.left {
		float: left;
		margin-right: 5px;
	}
</style>
<nav>
	<div class="nav-wrapper">
		<a href="${pageContext.request.contextPath}/article/mainData" class="brand-logo"><i class="material-icons">cloud</i>探险家</a>
		<ul id="nav-mobile" class="right hide-on-med-and-down">

			<li><a href="<%=path%>/article/articleInfo">
				<i class="material-icons left">perm_identity</i>${user.name}<span style="display:none;" id="messages" class="new badge blue"></span>
				</a>
			</li>
			<li><a class= "dropdown-button" href="#!" data-activates="dropdown2"> <i class=" material-icons">textsms</i></a></li>
			<li><a class= "dropdown-button" href="#!" data-activates="dropdown1"> <i class=" material-icons">settings</i></a></li>
		</ul>
	</div>
</nav>
<ul id="dropdown1" class="dropdown-content">
	<li><a href="<%=path%>/user/editUser?uid=${user.id}">修改信息</a></li>
	<li><a href="<%=path%>/jsp/testimg.jsp">修改头像</a></li>
	<li class="divider"></li>
	<li><a href="<%=path%>/user/logout">退出登录</a></li>
</ul>

<ul id="dropdown2" class="dropdown-content">
	<li><a href="<%=path%>/jsp/writeArticle.jsp">写文章</a></li>
	<li class="divider"></li>
	<li><a href="<%=path%>/jsp/startActivity.jsp">发起活动</a></li>
</ul>